export namespace="devtroncd"
export app_name="devtron"
export repo="devtron"
export helm="$repo/devtron-operator"
export url="https://helm.devtron.ai"
export source="gitee"

# helm repo remove $repo
helm repo add $repo $url
helm repo update $repo

helm upgrade --create-namespace --install \
  -n $namespace $app_name $helm \
  -f values.yaml


# 管理员密码 admin
# kubectl -n devtroncd get secret devtron-secret -o jsonpath='{.data.ADMIN_PASSWORD}' | base64 -d

# 安装状态
# kubectl -n devtroncd get installers installer-devtron -o jsonpath='{.status.sync.status}'

# helm uninstall devtron --namespace devtroncd
# kubectl delete -n devtroncd -f https://raw.githubusercontent.com/devtron-labs/charts/main/charts/devtron/crds/crd-devtron.yaml
# kubectl delete -n argo -f https://raw.githubusercontent.com/devtron-labs/devtron/main/manifests/yamls/workflow.yaml
# kubectl delete ns devtroncd devtron-cd devtron-ci devtron-demo

# helm delete devtron --namespace devtroncd
